import com.gcteamo.coj.tools as tools

class User:
    def __init__(self,uid,token):
        self.last_alive=0
        self.token=token
        self.token_time=tools.get_time()
        self.uid=uid
    def UpdateToken(self):
        self.token = tools.md5_string(self.token + str(tools.get_time()))
        self.token_time=tools.get_time()
        return self.token
    def UpdateAlive(self):
        self.last_alive=tools.get_time()